<!DOCTYPE html>
<html>
<head>
        <title>{{ Configs.ctf_name }}</title>  <!-- 确保配置返回中文赛事名称 -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="shortcut icon" href="{{ Configs.ctf_small_icon }}" type="image/x-icon">
        <link rel="stylesheet" href="{{ url_for('views.themes', path='css/fonts.css') }}">
        <link rel="stylesheet" href="{{ url_for('views.themes', path='css/main.css') }}">
        <link rel="stylesheet" href="{{ url_for('views.themes', path='css/core.css') }}">
        <link rel="stylesheet" href="{{ url_for('views.themes', path='css/nullify.css') }}">
        {% block stylesheets %}
        {% endblock %}

        {{ Plugins.styles }}
        <script type="text/javascript">
                var init = {
                        'urlRoot': "{{ request.script_root }}",
                        'csrfNonce': "{{ Session.nonce }}",
                        'userMode': "{{ Configs.user_mode }}",  // 确保返回"用户"或"团队"
                        'userId': {{ Session.id }},
                        'start': {{ Configs.start | tojson }},
                        'end': {{ Configs.end | tojson }},
                        'theme_settings': {{ Configs.theme_settings | tojson }}
                }
        </script>
    <style>
        body {
            background-image: url('/themes/nullify/static/img/bb.jpg');
            background-size: cover;
            background-attachment: fixed;
            background-position: center;
            background-repeat: no-repeat;
        }
    </style>
    {{ Configs.theme_header }}
</head>
<body>
        {% include "components/navbar.html" %}  <!-- 导航栏组件已汉化 -->

        <main role="main">
                {% block content %}
                {% endblock %}
        </main>

        <footer class="footer">
                <div class="container text-center">
                        <small class="text-muted">由民大信息安全竞赛平台提供技术支持</small>
                </div>
        </footer>

        <script defer src="{{ url_for('views.themes', path='js/vendor.bundle.js') }}"></script>
        <script defer src="{{ url_for('views.themes', path='js/core.js') }}"></script>
        <script defer src="{{ url_for('views.themes', path='js/helpers.js') }}"></script>

        {% block entrypoint %}
        <script defer src="{{ url_for('views.themes', path='js/pages/main.js') }}"></script>
        {% endblock %}

        {% block scripts %}
        {% endblock %}

        {{ Plugins.scripts }}

        {{ Configs.theme_footer }}
</body>
</html>
